{% extends "basex.html" %}

{% block collaps %}
    {% ifequal type "question" %}
        <h1>About Questions & Tags</h1>
        <br>
        <div class="help">
            <b>Question</b> is any statement, that require public solution or decision.
            <br><br>Do not ask trivial things (like <i>"Who is US president?"</i>) or hotline-style questions (like <i>"Help
            me with my
            computer, its smoking!"</i>).
            <br><br>Make sure that the decision of the statement you submit is important for you.
        </div>
        <p></p>
        <div class="help">
            <b>Tag</b> is a single word that has direct relation to tagged question.
            <br><br>Use single form nouns, with rare exceptions.
            <br><br>At this moment tags are the only way of data organization.
        </div>
    {% endifequal %}
    {% ifequal type "answer" %}
        <h1>About Answers</h1>
        <br>
        <div class="help">
            <b>Answers</b> are valid solutions to question statements.
            <br><br>Every answer is publically voted, and the one with big superiority is said to be the right one.
            <br><br>Make sure, that your answer is true and solves the question task.
        </div>
    {% endifequal %}
    {% ifequal type "fact" %}
        <h1>About Facts</h1>
        <br>
        <div class="help">
            <b>Fact</b> is a true neutral statement that can be verified and may affect the person's decision of current question.
        </div>
    {% endifequal %}
{% endblock %}

{% block content %}
    <br>
    {% if question %}
        <div class="tip">Question:</div>
        <div class="quest">{{ question.text|linebreaksbr }}</div>
        <div class="indent1">
    {% endif %}
<h2>Add new {{ type }}</h2>
<form action="/add?type={{ type }}{% if question %}&id={{ question.key }}{% endif %}&rnd={{ rnd }}" method="post">
    <div>
        {% ifequal type "tag" %}
            <input name="text">
        {% else %}
            <textarea name="text" rows="20" cols="60"></textarea>
        {% endifequal %}
    </div>
    {% ifequal type "question" %}
        <p><p>Tags: <span class="tip">(single comma-separated words)</span><input name="tags" rows="1" cols="55" value="{{ tagline }}"></p>
    {% endifequal %}
    <p>

    <div><input type="submit"
                data-theme="b"
                value="Add {{ type }}"
                data-icon="check"
                data-inline="true">
        <input type="button"
               value="Cancel"
               data-icon="arrow-l"
               data-inline="true"
               onclick="history.go(-1);"></div>
</form>
{% if question %}</div>{% endif %}
{% endblock %}